<!DOCTYPE html>
<html lang="en">
    <head>
        {include file="public/header" /}
    </head>
    <body>
        <div class="container">
            <div class="col-sm-12">
                <div class="paper" id="paper">
                    <div class="page-header">
                        <h2 class="text-center">{$paper.pap_name}</h2>
                    </div>
                    <div class="paper-time">
                    </div>
                    <form class="form" id="form">
                        <input type="hidden" name="papid" value="{$paper.pap_id}">
                        <?php $sort = ['A','B','C','D','E']; ?>
                        <?php foreach($choice as $key=>$value) { ?>
                        <div class="exam-content">
                            <div class="col-sm-12">
                                <div class="exam-title"><?php echo $key+1, '. ', $value['ch_title']; ?></div>
                            </div>
                            <div class="exam-option">
                                <?php foreach($value['ch_options'] as $k=>$val){ ?>
                                <div class="col-sm-12">
                                    <div class="char">
                                        <span><?php echo $sort[$k],':'?></span>
                                    </div>
                                    <div class="option"><?php echo $val; ?></div>
                                </div>
                                <?php } ?>
                                <div class="col-sm-12">
                                    <span class="btn btn-primary">正确答案：
                                        <?php foreach($value['ch_result'] as $chslt){ ?>
                                        <?php echo  $sort[$chslt]; ?>
                                        <?php }; ?>
                                    </span>                                    
                                    <?php if($value['ts_result'] == true){ ?>
                                    <span class="btn btn-success">你的答案：
                                        <?php foreach($value['ts_value'] as $tsv){ ?>
                                        <?php echo  $sort[$tsv]; ?>
                                        <?php }; ?>
                                    </span>
                                    <?php } else { ?>
                                    <span class="btn btn-danger">你的答案：
                                        <?php foreach($value['ts_value'] as $tsv){ ?>
                                        <?php echo  $sort[$tsv]; ?>
                                        <?php }; ?>
                                    </span>
                                    
                                    <?php } ?>
                                </div>                                
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <hr />
                        <?php } ?>
                    </form>
                </div>
            </div>
        </div>
        <div class="modal fade" tabindex="-1" role="dialog" id="modal" style="display:block">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">提示！</h4>
                    </div>
                    <div class="modal-body">
                        这个考试试卷所要时间为{$paper.pap_time}分钟，如果你准备好了，点击确定后，马上开始。
                        1：考试过程中，你可以翻书，可以可以翻手册，但是不能利用搜索引擎。
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        {include file="public/js" /}
        <script type="text/javascript">

        </script>
    </body>
</html>
